package com.zhoujian.FactoryMathod2.product;

import java.io.InputStream;

public abstract class AbstractResource {

    private String url;

    public AbstractResource(String url) {//构造器
        this.url = url;
    }

    public AbstractResource(){}//抽象类-----无参构造

    protected void shared(){
        System.out.println("这是共享的方法");
    }

    /**
     * 每个子类需要独自实现的方法
     * @return 字节流
     */
    public abstract InputStream getInputStream();
}
